package com.huawei.appmarket.service.store.awk.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import com.huawei.appmarket.service.store.awk.card.SmallHorizontalAppListCard;
import java.util.ArrayList;
import kotlin.Metadata;
import kotlin.TypeCastException;
import o.cdr;
import o.cgz;
import o.cht$d;
import o.chy;
import o.chz;
import o.ebk;
import o.ewm.d;
import o.ewm.h;
import o.fry;
import o.fsc;
import o.fsd;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Metadata(bv = {1, 0, 3}, d1 = {"\u0000T\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\b\u0016\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0012\u0010\t\u001a\u00020\n2\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0014J\u0010\u0010\u000b\u001a\u00020\b2\u0006\u0010\u0002\u001a\u00020\u0003H\u0014J\u0018\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0010\u001a\u00020\u000fH\u0016J\b\u0010\u0011\u001a\u00020\u0012H\u0014J\u0010\u0010\u0013\u001a\n\u0012\u0004\u0012\u00020\u0015\u0018\u00010\u0014H\u0016J\u0010\u0010\u0016\u001a\n\u0012\u0004\u0012\u00020\u0015\u0018\u00010\u0014H\u0016J\b\u0010\u0017\u001a\u00020\rH\u0016J\b\u0010\u0018\u001a\u00020\rH\u0016J\u0018\u0010\u0019\u001a\u00020\r2\u0006\u0010\u001a\u001a\u00020\u001b2\u0006\u0010\u0010\u001a\u00020\u000fH\u0016J\u0010\u0010\u001c\u001a\u00020\n2\u0006\u0010\u001d\u001a\u00020\u001eH\u0016R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0006X\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0007\u001a\u0004\u0018\u00010\bX\u000e¢\u0006\u0002\n\u0000¨\u0006\u001f"}, d2 = {"Lcom/huawei/appmarket/service/store/awk/node/SmallHorizontalAppListNode;", "Lcom/huawei/appgallery/foundation/card/base/node/BaseDistNode;", "context", "Landroid/content/Context;", "(Landroid/content/Context;)V", "interactiveControl", "Lcom/huawei/appmarket/service/interactive/control/InteractiveControl;", "smallHorizontalAppListCard", "Lcom/huawei/appmarket/service/store/awk/card/SmallHorizontalAppListCard;", "adjustInteractiveControl4Ring", "", "createCard", "createChildNode", "", "rootLayout", "Landroid/view/ViewGroup;", "parent", "getCardLayoutId", "", "getExposureDetail", "Ljava/util/ArrayList;", "", "getExposureExceptCard", "isCalculateChild", "isCompositeComponent", "setData", "dataItem", "Lcom/huawei/appgallery/foundation/ui/framework/cardkit/bean/CardChunk;", "setOnClickListener", "cardEventListener", "Lcom/huawei/appgallery/foundation/ui/framework/cardkit/bean/CardEventListener;", "WiseDist_release"}, k = 1, mv = {1, 1, 15})
public class SmallHorizontalAppListNode extends cdr {
    private SmallHorizontalAppListCard ˊ;
    private ebk ॱॱ;

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/huawei/appmarket/service/store/awk/card/SmallHorizontalAppListCard;", "invoke"}, k = 3, mv = {1, 1, 15})
    static final class c extends fsc implements fry<SmallHorizontalAppListCard> {
        final /* synthetic */ ViewGroup ˊ;
        final /* synthetic */ SmallHorizontalAppListNode ˎ;
        final /* synthetic */ LayoutParams ॱ;

        c(SmallHorizontalAppListNode smallHorizontalAppListNode, ViewGroup viewGroup, LayoutParams layoutParams) {
            this.ˎ = smallHorizontalAppListNode;
            this.ˊ = viewGroup;
            this.ॱ = layoutParams;
            super(0);
        }

        public /* synthetic */ Object ˋ() {
            return ˊ();
        }

        @NotNull
        public final SmallHorizontalAppListCard ˊ() {
            SmallHorizontalAppListNode smallHorizontalAppListNode = this.ˎ;
            Context ॱ = this.ˎ.ॱ;
            fsd.ॱ(ॱ, "context");
            SmallHorizontalAppListCard ˊ = smallHorizontalAppListNode.ˊ(ॱ);
            View inflate = LayoutInflater.from(this.ˎ.ॱ).inflate(this.ˎ.ˋ(), null);
            if (inflate == null) {
                throw new TypeCastException("null cannot be cast to non-null type android.widget.LinearLayout");
            }
            LinearLayout linearLayout = (LinearLayout) inflate;
            this.ˎ.ॱॱ = new ebk();
            ebk ˋ = this.ˎ.ॱॱ;
            if (ˋ != null) {
                ˋ.ˎ((View) linearLayout);
            }
            this.ˎ.ˎ(this.ˎ.ॱॱ);
            ˋ = this.ˎ.ॱॱ;
            if (ˋ != null) {
                ˋ.ˊ((View) linearLayout);
            }
            ˊ.ˊ(this.ˎ.ॱॱ);
            ˊ.ˏ((View) linearLayout);
            this.ˎ.ˊ(ˊ);
            this.ˊ.addView(linearLayout, this.ॱ);
            return ˊ;
        }
    }

    public SmallHorizontalAppListNode(@NotNull Context context) {
        fsd.ˊ((Object) context, "context");
        super(context, 1);
    }

    public boolean ॱ() {
        return true;
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    @org.jetbrains.annotations.Nullable
    public java.util.ArrayList<java.lang.String> z_() {
        /*
        r2 = this;
        r0 = r2.ˊ;
        if (r0 == 0) goto L_0x0015;
    L_0x0004:
        r0 = r0.ˊ();
        if (r0 == 0) goto L_0x0015;
    L_0x000a:
        r1 = new java.util.ArrayList;
        r1.<init>();
        r0 = (java.util.Collection) r0;
        r1.addAll(r0);
        return r1;
    L_0x0015:
        r0 = o.frj.ˎ();
        goto L_0x000a;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.huawei.appmarket.service.store.awk.node.SmallHorizontalAppListNode.z_():java.util.ArrayList<java.lang.String>");
    }

    @NotNull
    protected SmallHorizontalAppListCard ˊ(@NotNull Context context) {
        fsd.ˊ((Object) context, "context");
        return new SmallHorizontalAppListCard(context);
    }

    protected int ˋ() {
        return h.ʾˊ;
    }

    public boolean ॱ(@NotNull chz o_chz, @NotNull ViewGroup viewGroup) {
        fsd.ˊ((Object) o_chz, "dataItem");
        fsd.ˊ((Object) viewGroup, "parent");
        ebk o_ebk = this.ॱॱ;
        if (o_ebk != null) {
            o_ebk.ॱ(o_chz.ʻ());
        }
        return super.ॱ(o_chz, viewGroup);
    }

    public boolean ˊ(@NotNull ViewGroup viewGroup, @NotNull ViewGroup viewGroup2) {
        fsd.ˊ((Object) viewGroup, "rootLayout");
        fsd.ˊ((Object) viewGroup2, "parent");
        LayoutParams layoutParams = new LayoutParams(-1, -1);
        layoutParams.weight = 1.0f;
        this.ˊ = (SmallHorizontalAppListCard) new c(this, viewGroup, layoutParams).ˋ();
        return true;
    }

    @Nullable
    public ArrayList<String> ˋॱ() {
        ebk o_ebk = this.ॱॱ;
        return o_ebk != null ? o_ebk.ˋ() : null;
    }

    public boolean ʽ() {
        ebk o_ebk = this.ॱॱ;
        return (o_ebk != null ? o_ebk.ˎ() : null) != null;
    }

    public void ˋ(@NotNull chy o_chy) {
        fsd.ˊ((Object) o_chy, "cardEventListener");
        int ˊॱ = ˊॱ();
        int i = 0;
        while (i < ˊॱ) {
            cgz ˊ = ˊ(i);
            if (!(ˊ instanceof SmallHorizontalAppListCard)) {
                ˊ = null;
            }
            SmallHorizontalAppListCard smallHorizontalAppListCard = (SmallHorizontalAppListCard) ˊ;
            if (smallHorizontalAppListCard != null) {
                cht$d o_cht_d = new cht$d(o_chy, smallHorizontalAppListCard);
                View ˎ = smallHorizontalAppListCard.ˎ();
                if (ˎ != null) {
                    ˎ.setOnClickListener(o_cht_d);
                }
                smallHorizontalAppListCard.ॱ(o_chy);
                i++;
            } else {
                return;
            }
        }
    }

    protected void ˎ(@Nullable ebk o_ebk) {
        if (o_ebk != null) {
            View ˏ = o_ebk.ˏ();
            if (ˏ != null) {
                Context context = this.ॱ;
                fsd.ॱ(context, "context");
                ˏ.setPaddingRelative((int) context.getResources().getDimension(d.ˊ), ˏ.getPaddingTop(), ˏ.getPaddingEnd(), ˏ.getPaddingBottom());
            }
        }
    }
}
